 
package com.xbongbong.paas.domain.dao;

import com.xbongbong.paas.domain.entity.PaasPrintTemplateEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
* @author autoGen
* @time 2018-08-13 10:43:26
*/
@Repository
@Mapper
public interface PaasPrintTemplateDao {

	 
	Integer insert(PaasPrintTemplateEntity paasPrintTemplate);
	Integer update(PaasPrintTemplateEntity paasPrintTemplate);

	Integer insertBatch(@Param("list") List<PaasPrintTemplateEntity> paasPrintTemplateList);
	
	Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);
	PaasPrintTemplateEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);
	
	List<PaasPrintTemplateEntity>  findEntitys(@Param("param") Map<String, Object> param);
	Integer getEntitysCount(@Param("param") Map<String, Object> param);

	/**
	 * @param list
	 * @param corpid
	 * @return
	 */
	void updateBatch(@Param("list") List<PaasPrintTemplateEntity> list, @Param("corpid") String corpid);

	/**
	 * 批量删除模板(镜像3.0)
	 * @param idIn
	 * @param corpid
	 * @return
	 */
	Integer deleteBatch(@Param("list")List<Long> idIn, @Param("corpid")String corpid);

	/**
	 * 获取要操作的最大id,用于资金三期脚本迁移
	 *
	 * @param param
	 * @return
	 */
	Long getMaxId(@Param("param") Map<String, Object> param);

	/**
	 * 无差别更新打印数据，用于资金三期脚本迁移
	 *
	 * @param updateList
	 */
	void updateBatchAll(@Param("list") List<PaasPrintTemplateEntity> updateList);

	Integer deleteBatch4RollBack(@Param("param") Map<String,Object> param);
}